#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	FILE* fp;
	fp = fopen("my.txt", "w");
	if (fp == NULL)
	{
		printf("open file failed.\n");
		return 0;
	}
	char c = getchar();
	while (c != '\n')
	{
		fputc(c, fp);
		c = getchar();
	}
	return 0;
}